<me:UIWFS x:Class="WPFExcelReport.TWFSUBSCRIBER"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
                     xmlns:me="clr-namespace:WPFExcelReport" 
                     xmlns:WFD="clr-namespace:WPFExcelReport;assembly=TICC_WFEVENTDEF"
                    xmlns:HR="clr-namespace:WPFExcelReport;assembly=TICC_HRSTAMM"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"  
                    x:Name="TV"
                    Loaded="Window_Loaded"
                    >
    <me:UIWFS.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>
        <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
    </me:UIWFS.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition   Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition  Width="1*" />
            <ColumnDefinition Width="1*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
            <WrapPanel >
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=下载}}" Click="QueryCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=新建}}" Click="NewCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=编辑}}" Click="EditCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=复制}}" Click="CopyCommand"></Button>
                <Button Margin="15,0,0,0" Content="{Binding Source={Localization:Translate Word=保存}}" Click="SaveCommand"></Button>
                <Button Width="Auto"  HorizontalAlignment="Left"  Click="DeleteCommand" Content="{Binding Source={Localization:TranslateExtension Word=删除}}" Margin="10,0,0,0"  ></Button>
            </WrapPanel>
            <StackPanel>
                <WrapPanel>
                    <TextBlock>ROWNID</TextBlock>
                    <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID}" VerticalAlignment="Center" Width="60" />
                    <TextBlock Text="{Binding Source={Localization:Translate Word=用户组}}"></TextBlock>
                    <TextBox   HorizontalAlignment="Left" Margin="3" 
                                   Text="{Binding Path=USERGROUP}" VerticalAlignment="Center" Width="60" />
                </WrapPanel>
                <WrapPanel>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=用户}}"></TextBlock>
                    <TextBox Background="White"   HorizontalAlignment="Left" Margin="3" 
                         Text="{Binding Path=WFEUSER}" VerticalAlignment="Center" Width="60" />
                    <HR:TSHR KEY="{Binding VAR,ElementName=TV}"/>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=事件}}"></TextBlock>
                    <TextBox  Background="White"   HorizontalAlignment="Left" Margin="3"
                          Text="{Binding Path=WFEVENTS}" VerticalAlignment="Center" Width="120" />
                    <WFD:TSWFD KEY="{Binding ART,ElementName=TV}"/>
                </WrapPanel>
            </StackPanel>

        </StackPanel>

        <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="{Binding Source={Localization:Translate Word=ROWNID}}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=USERGROUP}" Header="{Binding Source={Localization:Translate Word=用户组}}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=WFEUSER,Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=用户}}"  Width="Auto" MinWidth="80"/>
                <DataGridTextColumn Binding="{Binding Path=WFEVENTS}" Header="{Binding Source={Localization:Translate Word=事件}}"   Width="Auto"  MinWidth="40"/>
                <DataGridTextColumn Binding="{Binding Path=NEWUSER, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=创建者}}"  Width="Auto" MinWidth="80"/>
                <DataGridTextColumn Binding="{Binding Path=NEWTIME}" Header="{Binding Source={Localization:Translate Word=创建日期}}"  Width="Auto" MinWidth="80"/>
                <DataGridTextColumn Binding="{Binding Path=CHGUSER, Converter={StaticResource ResourceKey=gb2312}}" Header="{Binding Source={Localization:Translate Word=变更}}"  Width="Auto" MinWidth="80"/>
                <DataGridTextColumn Binding="{Binding Path=CHGTIME}" Header="{Binding Source={Localization:Translate Word=变更日期}}"  Width="Auto" MinWidth="80"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</me:UIWFS>
